<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div>2323</div>
  <input id="input" onclick="handleInput()" type="text">
  <!-- <button id="btn" onclick="handleClick()">点击</button> -->
</body>
<script>
  const btn = document.getElementById('btn')
  const input = document.getElementById('input')
  // debugger
  // btn.addEventListener('click', function (e) { 
  //   alert('被点击了')
  // }, false)
  // btn.dispatchEvent('click')
  input.click()
  // function handleClick () {
  //   alert('被点击了')
  // }
  function handleInput () {
    alert('被点击了input')
    input.focus()
  }
</script>
</html>